<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>
<link rel="stylesheet" href="../static/main/css/styles.css">
<link rel="stylesheet" type="text/css"
	href="../static/jquery-ui-themes-1.10.4/themes/ui-darkness/jquery.ui.theme.css">
<link rel="stylesheet" type="text/css"
	href="../static/jquery-ui-themes-1.10.4/themes/ui-darkness/jquery-ui.css">
<link rel="stylesheet"
	href="../webjars/bootstrap/3.3.7-1/css/bootstrap.css">
<link rel="stylesheet" type="text/css"
	href="../static/jqgrid/css/ui.jqgrid.css">
<script type="text/javascript"
	src="../static/jqgrid/js/jquery-1.7.2.min.js"></script>
<script type="text/javascript"
	src="../webjars/bootstrap/3.3.7-1/js/bootstrap.js"></script>
<script type="text/javascript"
	src="../static/jqgrid/js/jquery.jqGrid.min.js"></script>
<script type="text/javascript" src="../static/laydate/laydate.js"></script>
<script type="text/javascript" src="../static/jqgrid/js/jquery-ui.js"></script>
<script type="text/javascript"
	src="../static/jqgrid/js/grid.locale-cn.js"></script>
<script type="text/javascript">
	$(function(){
		$('#list1').jqGrid({
			url: 'list',
			editurl:'edit',
			caption:'用户列表', 
			altRow:true,
			autowidth:true,
			width:'100%',
			/* height:'100%', */
			datatype:'json',
			mtype:'post',
			PageSize: 15,
			rowNum:10,
			rowList : [5 , 10, 35, 100 ],
			prmNames:{search:'search'},
			sortname:'id',
			viewrecords:true,
			pager:'#dhl',
			jsonReader:{
				repeatitems:false,
				id:'id'
			},
			colModel:[
				//{name:'id',label:'编号',index:'id',align:'center',width:'60',sorttype:'int'},
				{name:'name',label:'姓名',index:'name',align:'center',width:'100',sorttype:'text',editable:true,
					editrules:{required: true}},
				{name:'username',label:'用户名',index:'username',align:'center',sorttype:'text',editable:true,
					editrules:{required: true,meil: true}},
				{name:'password',label:'密码',index:'password',align:'center',width:'100',editable:true,sortable:false ,edittype:'password',hidden:true,editrules:{edithidden:true,required: true, number: true,custom_func: ValidateTpassword}},
				{name:'beizhu',label:'备注',index:'beizhu',align:'center',width:'100',sorttype:'text',editable:true}
			]
			
		});
		
		 function ValidateTpassword(value, name) {
				if (value < 8 && value >20) {
				return [false,"用户名不是大于8和小于20的值"];
				}
				else {
				return [true,""];
				}
			} 
		
		$('#list1').jqGrid('navGrid', '#dhl', {
				search:false,
				edit : true,
				add : true,
				del : true,
				/* view : true, */
				 searchtext:'查找',edittext:'编辑',addtext:'添加',refreshtext:'刷新', deltext:'删除',position:'left'
			}, {
				top:204,
				left:453
				/* beforeShowForm:function(frm){
					frm.find('#name').attr('readOnly',true)；//把编辑框中的字段设置为只读的。
					} */
				
			}, {
				top:204,
				left:453
			}, {
				top:204,
				left:453
			},{
				multipleSearch:true
			}
			);

		});
	</script>
<style type="text/css">
.neirong {
	margin: 0;
	padding-left: 15%;
	padding-right: 15%;
}

.ui-pg-input {
	background: #999;
	color: #000;
	text-align: center;
	font-size: 20px;
	font-weight: 1000;
}

.ui-pg-selbox {
	background: #999;
	color: #000;
	font-weight: 1000;
}

.ui-pg-selbox option {
	font-weight: 1000;
}

#password {
	background: black;
	color: #ffffff;
	/* border: 1px solid #666666; */
	/* padding: .3em;
			margin: 0em; */
	font-family: Segoe UI, Arial, sans-serif;
	font-size: 1em;
	border-top-left-radius: 6px;
	border-top-right-radius: 6px;
	border-bottom-left-radius: 6px;
	border-bottom-right-radius: 6px;
}

#fa {
	margin: 0;
	padding: 0 5px;
	font-weight: 1000;
	font-size: 25px;
}

select {
	background: #999;
	color: #000;
}

option {
	background: #999;
	color: #000;
}

.add-rule ui-add {
	color: #000;
}
</style>
</head>
<body>
	<div class="caidan">
		<div class="htmleaf-container">
			<nav class="animenu">
				<ul class="animenu__nav"
					style="margin-left: 15%; margin-right: 15%;">
					<li style="font-size: 20px; font-weight: 1100;"><a id="fa">发票管理系统</a></li>
					<li><a href="../main"><span
							class="glyphicon glyphicon-home">首页</span></a></li>
					<li><a>欢迎您:<span sec:authorize="hasRole('ROLE_DBA')">>开发者</span><span
							sec:authorize="!hasRole('ROLE_DBA')"
							sec:authentication="principal.name">张三</span></a>
					<li sec:authorize="hasRole('ROLE_MANAGER')"><a
						href="../UserTenant/zuhugl"><span
							class="glyphicon glyphicon-pencil">租户编辑</span></a></li>
					<li sec:authorize="hasRole('ROLE_ADMIN')"><a
						href="../UserManager/xzgl"><span
							class="glyphicon glyphicon-pencil">用户编辑</span></a></li>
					<li sec:authorize="hasRole('ROLE_ZUHU')"><a
						href="../User/xzgl"><span class="glyphicon glyphicon-pencil">用户管理</span></a></li>
					<li sec:authorize="hasRole('ROLE_MANAGER')"><a
						href="../UserManager/fpcx">电子发票查询</a></li>
					<li sec:authorize="hasRole('ROLE_ZUHU')"><a
						href="../Tenantxx/zxfp">新增电子发票信息</a></li>
					<li sec:authorize="hasRole('ROLE_MANAGER')"><a
						href="../UserManager/sqxx">软件授权信息</a>
					<li sec:authorize="hasRole('ROLE_ADMIN')"><a
						href="../SysUser/yhcz">用户操作日志</a></li>
					<li sec:authorize="hasRole('ROLE_ZUHU')"><a
						href="../UserTenant/xgmm"><span
							class="glyphicon glyphicon-tags">&nbsp;修改密码</span></a></li>
					<li sec:authorize="hasRole('ROLE_MANAGER')"><a
						href="../UserManager/xgmm"><span
							class="glyphicon glyphicon-tags">&nbsp;修改密码</span></a></li>
					<li sec:authorize="hasRole('ROLE_ADMIN')"><a
						href="../SysUser/xgmm"><span class="glyphicon glyphicon-tags">&nbsp;修改密码</span></a></li>
					<li style="float: right;"><a href="../logout"><span
							class="glyphicon glyphicon-off">注销</span></a></li>
				</ul>
			</nav>
		</div>
	</div>


	<div class="neirong">
		<table id="list1"></table>
		<div id="dhl"></div>
	</div>

</body>
</html>